

export default {
    name: "taskCondition",
    data() {
        return {
            ids: [],
            searchForm: {
                entName: '',
            },
            tableData: [],
            pager: {
                page: 0,
                size: 20,
                total: 0
            },
        }
    },
    computed: {
        height() {
            return `calc(100vh - 350px)`;
        }
    },
    mounted() {
        this.getList();
    },
    methods: {
        dateFormatter(row){
            return this.formatDate(row.createTime,"yyyy-MM-dd");
        },
        addEntBase(){
            this.$router.push({path:"/ent/tab"});
        },
        view(row){
            this.$router.push({path: '/ent/entDisplay/entMain', query: {entId: row.id}});
        },
        edit(row){
            this.$message({
                type: 'error',
                message: "功能开发中"
            });
        },
        // 获取条件列表
        getList: function () {
            let params = {
                page: this.pager.page === 0 ? this.pager.page : this.pager.page - 1,
                size: this.pager.size,
                entName:this.searchForm.entName
            };
            this.$api.formPost( '/api/biz/ent/doGetListByFr',params).then(res => {
                if(res.retHead.code=="0000000"){
                    this.tableData = res.retBody.list;
                    this.pager.total = res.retBody.total;
                   
                }else{
                    this.$message({
                        type: 'error',
                        message: res.retHead.message
                    });
                }
            });
        },
        handleSelectionChange: function(val){
            this.ids = val;
        },
        handleSizeChange(val) {
            this.pager.size = val;
        },
        handleCurrentChange(val) {
            this.pager.page = val;
        },
    }
}
